//resolve用来拼接绝对路径的方法
const { resolve } = require('path');
module.exports = {
    entry: './src/index.js',
    output: {
        filename: 'build.js',
        //_dirname node里面的变量，代表当前文件绝对目录
        path: resolve(__dirname, 'build'),
    },
    //load配置
    module: {
        rules: [
            {
                test: /\.css$/,
                use: ['style-loader', 'css-loader'],
            },
            {
                test: /\.less$/,
                use: ['style-loader', 'css-loader', 'less-loader'],
            },
        ],
    },
    plugins: [],
    mode: 'development',
    // mode:"production"
};
